.class Lcom/ss/android/socialbase/downloader/j/a$a;
.super Ljava/lang/Object;
.source "AsyncStreamReader.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/ss/android/socialbase/downloader/j/a;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/ss/android/socialbase/downloader/j/a;


# direct methods
.method constructor <init>(Lcom/ss/android/socialbase/downloader/j/a;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    const/16 v0, 0xa

    .line 1
    invoke-static {v0}, Landroid/os/Process;->setThreadPriority(I)V

    :cond_0
    const/4 v0, 0x1

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v1}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;)Lcom/ss/android/socialbase/downloader/j/b;

    move-result-object v1

    .line 3
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2}, Lcom/ss/android/socialbase/downloader/j/a;->b(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/io/InputStream;

    move-result-object v2

    iget-object v3, v1, Lcom/ss/android/socialbase/downloader/j/b;->a:[B

    invoke-virtual {v2, v3}, Ljava/io/InputStream;->read([B)I

    move-result v2

    iput v2, v1, Lcom/ss/android/socialbase/downloader/j/b;->b:I

    .line 4
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2, v1}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;Lcom/ss/android/socialbase/downloader/j/b;)V

    .line 5
    iget v1, v1, Lcom/ss/android/socialbase/downloader/j/b;->b:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    const/4 v2, -0x1

    if-ne v1, v2, :cond_0

    .line 6
    iget-object v1, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v1}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v1

    monitor-enter v1

    .line 7
    :try_start_1
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2, v0}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;Z)Z

    .line 8
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->notify()V

    .line 9
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 10
    :try_start_2
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    :goto_0
    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/j/a;->b(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/io/InputStream;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    goto :goto_1

    :catchall_0
    move-exception v0

    .line 11
    :try_start_3
    monitor-exit v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v0

    :catchall_1
    move-exception v1

    .line 12
    :try_start_4
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2, v1}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;Ljava/lang/Throwable;)Ljava/lang/Throwable;

    .line 13
    invoke-virtual {v1}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_4

    .line 14
    iget-object v1, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v1}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v1

    monitor-enter v1

    .line 15
    :try_start_5
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2, v0}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;Z)Z

    .line 16
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->notify()V

    .line 17
    monitor-exit v1
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_3

    .line 18
    :try_start_6
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_2

    goto :goto_0

    :catchall_2
    :goto_1
    return-void

    :catchall_3
    move-exception v0

    .line 19
    :try_start_7
    monitor-exit v1
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_3

    throw v0

    :catchall_4
    move-exception v1

    .line 20
    iget-object v2, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v2}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v2

    monitor-enter v2

    .line 21
    :try_start_8
    iget-object v3, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v3, v0}, Lcom/ss/android/socialbase/downloader/j/a;->a(Lcom/ss/android/socialbase/downloader/j/a;Z)Z

    .line 22
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/j/a;->c(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->notify()V

    .line 23
    monitor-exit v2
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_6

    .line 24
    :try_start_9
    iget-object v0, p0, Lcom/ss/android/socialbase/downloader/j/a$a;->a:Lcom/ss/android/socialbase/downloader/j/a;

    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/j/a;->b(Lcom/ss/android/socialbase/downloader/j/a;)Ljava/io/InputStream;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_5

    .line 25
    :catchall_5
    throw v1

    :catchall_6
    move-exception v0

    .line 26
    :try_start_a
    monitor-exit v2
    :try_end_a
    .catchall {:try_start_a .. :try_end_a} :catchall_6

    goto :goto_3

    :goto_2
    throw v0

    :goto_3
    goto :goto_2
.end method
